Optimal. Leaf size=91 \[ -\frac {3 \text {ArcTan}(\sinh (e+f x)) \sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)}{2 f}+\frac {3 \sqrt {a \cosh ^2(e+f x)} \tanh (e+f x)}{2 f}-\frac {\sqrt {a \cosh ^2(e+f x)} \tanh ^3(e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3255, 3286,
2672, 294, 327, 209} \begin {gather*} -\frac {3 \text {sech}(e+f x) \sqrt {a \cosh ^2(e+f x)} \text {ArcTan}(\sinh (e+f x))}{2 f}-\frac {\tanh ^3(e+f x) \sqrt {a \cosh ^2(e+f x)}}{2 f}+\frac {3 \tanh (e+f x) \sqrt {a \cosh ^2(e+f x)}}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 294
Rule 327
Rule 2672
Rule 3255
Rule 3286
Rubi steps
\begin {align*} \int \sqrt {a+a \sinh ^2(e+f x)} \tanh ^4(e+f x) \, dx &=\int \sqrt {a \cosh ^2(e+f x)} \tanh ^4(e+f x) \, dx\\ &=\left (\sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \int \sinh (e+f x) \tanh ^3(e+f x) \, dx\\ &=\frac {\left (\sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\sinh (e+f x)\right )}{f}\\ &=-\frac {\sqrt {a \cosh ^2(e+f x)} \tanh ^3(e+f x)}{2 f}+\frac {\left (3 \sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\sinh (e+f x)\right )}{2 f}\\ &=\frac {3 \sqrt {a \cosh ^2(e+f x)} \tanh (e+f x)}{2 f}-\frac {\sqrt {a \cosh ^2(e+f x)} \tanh ^3(e+f x)}{2 f}-\frac {\left (3 \sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (e+f x)\right )}{2 f}\\ &=-\frac {3 \tan ^{-1}(\sinh (e+f x)) \sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)}{2 f}+\frac {3 \sqrt {a \cosh ^2(e+f x)} \tanh (e+f x)}{2 f}-\frac {\sqrt {a \cosh ^2(e+f x)} \tanh ^3(e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 55, normalized size = 0.60 \begin {gather*} \frac {a (-3 \text {ArcTan}(\sinh (e+f x)) \cosh (e+f x)+(2+\cosh (2 (e+f x))) \tanh (e+f x))}{2 f \sqrt {a \cosh ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.24, size = 69, normalized size = 0.76
method | result | size |
default | \(-\frac {a \left (3 \arctan \left (\sinh \left (f x +e \right )\right ) \left (\cosh ^{2}\left (f x +e \right )\right )-2 \left (\cosh ^{2}\left (f x +e \right )\right ) \sinh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{2 \cosh \left (f x +e \right ) \sqrt {a \left (\cosh ^{2}\left (f x +e \right )\right )}\, f}\) | \(69\) |
risch | \(\frac {\sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{2 f x +2 e}}{2 f \left ({\mathrm e}^{2 f x +2 e}+1\right )}-\frac {\sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}}{2 f \left ({\mathrm e}^{2 f x +2 e}+1\right )}+\frac {\left ({\mathrm e}^{2 f x +2 e}-1\right ) \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{2 f x +2 e}}{f \left ({\mathrm e}^{2 f x +2 e}+1\right )^{3}}+\frac {3 i \ln \left ({\mathrm e}^{f x}-i {\mathrm e}^{-e}\right ) \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{f x +e}}{2 f \left ({\mathrm e}^{2 f x +2 e}+1\right )}-\frac {3 i \ln \left ({\mathrm e}^{f x}+i {\mathrm e}^{-e}\right ) \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{f x +e}}{2 f \left ({\mathrm e}^{2 f x +2 e}+1\right )}\) | \(290\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 413 vs.
\(2 (86) = 172\).
time = 0.53, size = 413, normalized size = 4.54 \begin {gather*} \frac {15 \, \sqrt {a} \arctan \left (e^{\left (-f x - e\right )}\right )}{8 \, f} + \frac {3 \, \sqrt {a} \arctan \left (e^{\left (-f x - e\right )}\right ) + \frac {5 \, \sqrt {a} e^{\left (-f x - e\right )} + 3 \, \sqrt {a} e^{\left (-3 \, f x - 3 \, e\right )}}{2 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )} + 1}}{4 \, f} + \frac {3 \, \sqrt {a} \arctan \left (e^{\left (-f x - e\right )}\right ) - \frac {3 \, \sqrt {a} e^{\left (-f x - e\right )} + 5 \, \sqrt {a} e^{\left (-3 \, f x - 3 \, e\right )}}{2 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )} + 1}}{4 \, f} - \frac {3 \, {\left (\sqrt {a} \arctan \left (e^{\left (-f x - e\right )}\right ) - \frac {\sqrt {a} e^{\left (-f x - e\right )} - \sqrt {a} e^{\left (-3 \, f x - 3 \, e\right )}}{2 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )} + 1}\right )}}{8 \, f} + \frac {25 \, \sqrt {a} e^{\left (-2 \, f x - 2 \, e\right )} + 15 \, \sqrt {a} e^{\left (-4 \, f x - 4 \, e\right )} + 8 \, \sqrt {a}}{16 \, f {\left (e^{\left (-f x - e\right )} + 2 \, e^{\left (-3 \, f x - 3 \, e\right )} + e^{\left (-5 \, f x - 5 \, e\right )}\right )}} - \frac {15 \, \sqrt {a} e^{\left (-f x - e\right )} + 25 \, \sqrt {a} e^{\left (-3 \, f x - 3 \, e\right )} + 8 \, \sqrt {a} e^{\left (-5 \, f x - 5 \, e\right )}}{16 \, f {\left (2 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 742 vs.
\(2 (79) = 158\).
time = 0.49, size = 742, normalized size = 8.15 \begin {gather*} \frac {{\left (6 \, \cosh \left (f x + e\right ) e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{5} + e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{6} + 3 \, {\left (5 \, \cosh \left (f x + e\right )^{2} + 1\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{4} + 4 \, {\left (5 \, \cosh \left (f x + e\right )^{3} + 3 \, \cosh \left (f x + e\right )\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{3} + 3 \, {\left (5 \, \cosh \left (f x + e\right )^{4} + 6 \, \cosh \left (f x + e\right )^{2} - 1\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{2} + 6 \, {\left (\cosh \left (f x + e\right )^{5} + 2 \, \cosh \left (f x + e\right )^{3} - \cosh \left (f x + e\right )\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right ) - 6 \, {\left (5 \, \cosh \left (f x + e\right ) e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{4} + e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{5} + 2 \, {\left (5 \, \cosh \left (f x + e\right )^{2} + 1\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{3} + 2 \, {\left (5 \, \cosh \left (f x + e\right )^{3} + 3 \, \cosh \left (f x + e\right )\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{2} + {\left (5 \, \cosh \left (f x + e\right )^{4} + 6 \, \cosh \left (f x + e\right )^{2} + 1\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right ) + {\left (\cosh \left (f x + e\right )^{5} + 2 \, \cosh \left (f x + e\right )^{3} + \cosh \left (f x + e\right )\right )} e^{\left (f x + e\right )}\right )} \arctan \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right ) + {\left (\cosh \left (f x + e\right )^{6} + 3 \, \cosh \left (f x + e\right )^{4} - 3 \, \cosh \left (f x + e\right )^{2} - 1\right )} e^{\left (f x + e\right )}\right )} \sqrt {a e^{\left (4 \, f x + 4 \, e\right )} + 2 \, a e^{\left (2 \, f x + 2 \, e\right )} + a} e^{\left (-f x - e\right )}}{2 \, {\left (f \cosh \left (f x + e\right )^{5} + {\left (f e^{\left (2 \, f x + 2 \, e\right )} + f\right )} \sinh \left (f x + e\right )^{5} + 5 \, {\left (f \cosh \left (f x + e\right ) e^{\left (2 \, f x + 2 \, e\right )} + f \cosh \left (f x + e\right )\right )} \sinh \left (f x + e\right )^{4} + 2 \, f \cosh \left (f x + e\right )^{3} + 2 \, {\left (5 \, f \cosh \left (f x + e\right )^{2} + {\left (5 \, f \cosh \left (f x + e\right )^{2} + f\right )} e^{\left (2 \, f x + 2 \, e\right )} + f\right )} \sinh \left (f x + e\right )^{3} + 2 \, {\left (5 \, f \cosh \left (f x + e\right )^{3} + 3 \, f \cosh \left (f x + e\right ) + {\left (5 \, f \cosh \left (f x + e\right )^{3} + 3 \, f \cosh \left (f x + e\right )\right )} e^{\left (2 \, f x + 2 \, e\right )}\right )} \sinh \left (f x + e\right )^{2} + f \cosh \left (f x + e\right ) + {\left (f \cosh \left (f x + e\right )^{5} + 2 \, f \cosh \left (f x + e\right )^{3} + f \cosh \left (f x + e\right )\right )} e^{\left (2 \, f x + 2 \, e\right )} + {\left (5 \, f \cosh \left (f x + e\right )^{4} + 6 \, f \cosh \left (f x + e\right )^{2} + {\left (5 \, f \cosh \left (f x + e\right )^{4} + 6 \, f \cosh \left (f x + e\right )^{2} + f\right )} e^{\left (2 \, f x + 2 \, e\right )} + f\right )} \sinh \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sinh ^{2}{\left (e + f x \right )} + 1\right )} \tanh ^{4}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 100, normalized size = 1.10 \begin {gather*} -\frac {{\left (3 \, \pi - \frac {4 \, {\left (e^{\left (f x + e\right )} - e^{\left (-f x - e\right )}\right )}}{{\left (e^{\left (f x + e\right )} - e^{\left (-f x - e\right )}\right )}^{2} + 4} + 6 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, f x + 2 \, e\right )} - 1\right )} e^{\left (-f x - e\right )}\right ) - 2 \, e^{\left (f x + e\right )} + 2 \, e^{\left (-f x - e\right )}\right )} \sqrt {a}}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tanh}\left (e+f\,x\right )}^4\,\sqrt {a\,{\mathrm {sinh}\left (e+f\,x\right )}^2+a} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________